{if session('admin.id')>2}
<div class="panel panel-default panel-intro" style="margin-bottom: 20px;">
    <div class="panel-heading" style="padding: 15px;">
        如需修改营业执照，法人身份证、经营类型等信息。 请联系平台。
<!--        <strong class="text-danger">推广奖励选择参加或不参加后，不可更改。</strong>-->
    </div>
</div>
{/if}

<form id="edit-form" class="form-horizontal" role="form" data-toggle="validator" method="POST" action="">

<!--    <div class="form-group">-->
<!--        <label class="control-label col-xs-12 col-sm-2">{:__('User_id')}:</label>-->
<!--        <div class="col-xs-12 col-sm-8">-->
<!--            <input id="c-user_id" data-rule="required" data-source="user/user/index" data-field="nickname" class="form-control selectpage" name="row[user_id]" type="text" value="{$row.user_id|htmlentities}">-->
<!--        </div>-->
<!--    </div>-->
    {if session('admin.id')<=2}
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Type')}:</label>
        <div class="col-xs-12 col-sm-8">

            <select  id="c-type" data-rule="required" class="form-control selectpicker" name="row[type]">
                {foreach name="typeList" item="vo"}
                    <option value="{$key}" {in name="key" value="$row.type"}selected{/in}>{$vo}</option>
                {/foreach}
            </select>

        </div>
    </div>
    {/if}
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Name')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-name" data-rule="required" class="form-control" name="row[name]" type="text" value="{$row.name|htmlentities}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Logo_image')}:</label>
        <div class="col-xs-12 col-sm-8">
            <div class="input-group">
                <input id="c-logo_image" data-rule="required" class="form-control" size="50" name="row[logo_image]" type="text" value="{$row.logo_image|htmlentities}">
                <div class="input-group-addon no-border no-padding">
                    <span><button type="button" id="faupload-logo_image" class="btn btn-danger faupload" data-input-id="c-logo_image" data-mimetype="image/gif,image/jpeg,image/png,image/jpg,image/bmp" data-multiple="false" data-preview-id="p-logo_image"><i class="fa fa-upload"></i> {:__('Upload')}</button></span>
                    <span><button type="button" id="fachoose-logo_image" class="btn btn-primary fachoose" data-input-id="c-logo_image" data-mimetype="image/*" data-multiple="false"><i class="fa fa-list"></i> {:__('Choose')}</button></span>
                </div>
                <span class="msg-box n-right" for="c-logo_image"></span>
            </div>
            <ul class="row list-inline faupload-preview" id="p-logo_image"></ul>
        </div>
    </div>
<!--    <div class="form-group">-->
<!--        <label class="control-label col-xs-12 col-sm-2">{:__('Likes')}:</label>-->
<!--        <div class="col-xs-12 col-sm-8">-->
<!--            <input id="c-likes" data-rule="required" class="form-control" name="row[likes]" type="number" value="{$row.likes|htmlentities}">-->
<!--        </div>-->
<!--    </div>-->
    {if $row['status']!==0}
<!--    <div class="form-group">-->
<!--        <label class="control-label col-xs-12 col-sm-2">{:__('Thumb_image')}:</label>-->
<!--        <div class="col-xs-12 col-sm-8">-->
<!--            <div class="input-group">-->
<!--                <input id="c-thumb_image" data-rule="required" class="form-control" size="50" name="row[thumb_image]" type="text" value="{$row.thumb_image|htmlentities}">-->
<!--                <div class="input-group-addon no-border no-padding">-->
<!--                    <span><button type="button" id="faupload-thumb_image" class="btn btn-danger faupload" data-input-id="c-thumb_image" data-mimetype="image/gif,image/jpeg,image/png,image/jpg,image/bmp" data-multiple="false" data-preview-id="p-thumb_image"><i class="fa fa-upload"></i> {:__('Upload')}</button></span>-->
<!--                    <span><button type="button" id="fachoose-thumb_image" class="btn btn-primary fachoose" data-input-id="c-thumb_image" data-mimetype="image/*" data-multiple="false"><i class="fa fa-list"></i> {:__('Choose')}</button></span>-->
<!--                </div>-->
<!--                <span class="msg-box n-right" for="c-thumb_image"></span>-->
<!--            </div>-->
<!--            <ul class="row list-inline faupload-preview" id="p-thumb_image"></ul>-->
<!--        </div>-->
<!--    </div>-->
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('视频，大小不超过30MB')}:</label>
        <div class="col-xs-12 col-sm-8">
            <div class="input-group">
                <input id="c-video" data-rule="" class="form-control" size="50" name="row[video]" type="text" value="{$row.video|htmlentities}">
                <div class="input-group-addon no-border no-padding">
                    <span><button type="button" id="faupload-video" class="btn btn-danger faupload" data-input-id="c-video" data-mimetype="video/mp4" data-multiple="false" data-preview-id="p-video"><i class="fa fa-upload"></i> {:__('Upload')}</button></span>
                    <span><button type="button" id="fachoose-video" class="btn btn-primary fachoose" data-input-id="c-video" data-mimetype="video/mp4" data-multiple="false"><i class="fa fa-list"></i> {:__('Choose')}</button></span>
                </div>
                <span class="msg-box n-right" for="c-video"></span>
            </div>
            <ul class="row list-inline faupload-preview" id="p-video"></ul>
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Images')}:</label>
        <div class="col-xs-12 col-sm-8">
            <div class="input-group">
                <input id="c-images" data-rule="required" class="form-control" size="50" name="row[images]" type="text" value="{$row.images|htmlentities}">
                <div class="input-group-addon no-border no-padding">
                    <span><button type="button" id="faupload-images" class="btn btn-danger faupload" data-input-id="c-images" data-mimetype="image/gif,image/jpeg,image/png,image/jpg,image/bmp" data-multiple="true" data-preview-id="p-images"><i class="fa fa-upload"></i> {:__('Upload')}</button></span>
                    <span><button type="button" id="fachoose-images" class="btn btn-primary fachoose" data-input-id="c-images" data-mimetype="image/*" data-multiple="true"><i class="fa fa-list"></i> {:__('Choose')}</button></span>
                </div>
                <span class="msg-box n-right" for="c-images"></span>
            </div>
            <ul class="row list-inline faupload-preview" id="p-images"></ul>
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Share_images')}:</label>
        <div class="col-xs-12 col-sm-8">
            <div class="input-group">
                <input id="c-share_images" data-rule="required" class="form-control" size="50" name="row[share_images]" type="text" value="{$row.share_images|htmlentities}">
                <div class="input-group-addon no-border no-padding">
                    <span><button type="button" id="faupload-share_images" class="btn btn-danger faupload" data-input-id="c-share_images" data-mimetype="image/gif,image/jpeg,image/png,image/jpg,image/bmp" data-multiple="true" data-preview-id="p-share_images"><i class="fa fa-upload"></i> {:__('Upload')}</button></span>
                    <span><button type="button" id="fachoose-share_images" class="btn btn-primary fachoose" data-input-id="c-share_images" data-mimetype="image/*" data-multiple="true"><i class="fa fa-list"></i> {:__('Choose')}</button></span>
                </div>
                <span class="msg-box n-right" for="c-share_images"></span>
            </div>
            <ul class="row list-inline faupload-preview" id="p-share_images"></ul>
        </div>
    </div>
    {/if}
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Phone')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-phone" data-rule="required" class="form-control" name="row[phone]" type="text" value="{$row.phone|htmlentities}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Address')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-address" data-rule="required" class="form-control" name="row[address]" type="text" value="{$row.address|htmlentities}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Area')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-area" data-rule="" class="form-control" name="row[area]" type="number" value="{$row.area|htmlentities}">
        </div>
    </div>
    <div class="form-group" {if session('admin.id')!=1}style='display: none'{/if}>
        <label class="control-label col-xs-12 col-sm-2">{:__('Longitude')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-longitude" data-rule="required" class="form-control" step="0.0000000001" name="row[longitude]" type="number" value="{$row.longitude|htmlentities}">
        </div>
    </div>
    <div class="form-group" {if session('admin.id')!=1}style='display: none'{/if}>
        <label class="control-label col-xs-12 col-sm-2">{:__('Latitude')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-latitude" data-rule="required" class="form-control" step="0.0000000001" name="row[latitude]" type="number" value="{$row.latitude|htmlentities}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Business_hours')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-business_hours" data-rule="required" class="form-control" name="row[business_hours]" type="text" value="{$row.business_hours|htmlentities}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Content_')}:</label>
        <div class="col-xs-12 col-sm-8">
            <textarea id="c-content_" data-rule="required" class="form-control " rows="5" name="row[content_]" cols="50">{$row.content_|htmlentities}</textarea>
        </div>
    </div>
    {if session('admin.id')<=2}
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('License_image')}:</label>
        <div class="col-xs-12 col-sm-8">
            <div class="input-group">
                <input id="c-license_image" data-rule="required" class="form-control" size="50" name="row[license_image]" type="text" value="{$row.license_image|htmlentities}">
                <div class="input-group-addon no-border no-padding">
                    <span><button type="button" id="faupload-license_image" class="btn btn-danger faupload" data-input-id="c-license_image" data-mimetype="image/gif,image/jpeg,image/png,image/jpg,image/bmp" data-multiple="false" data-preview-id="p-license_image"><i class="fa fa-upload"></i> {:__('Upload')}</button></span>
                    <span><button type="button" id="fachoose-license_image" class="btn btn-primary fachoose" data-input-id="c-license_image" data-mimetype="image/*" data-multiple="false"><i class="fa fa-list"></i> {:__('Choose')}</button></span>
                </div>
                <span class="msg-box n-right" for="c-license_image"></span>
            </div>
            <ul class="row list-inline faupload-preview" id="p-license_image"></ul>
        </div>
    </div>
<!--    <div class="form-group">-->
<!--        <label class="control-label col-xs-12 col-sm-2">{:__('Card_up_image')}:</label>-->
<!--        <div class="col-xs-12 col-sm-8">-->
<!--            <div class="input-group">-->
<!--                <input id="c-card_up_image" data-rule="required" class="form-control" size="50" name="row[card_up_image]" type="text" value="{$row.card_up_image|htmlentities}">-->
<!--                <div class="input-group-addon no-border no-padding">-->
<!--                    <span><button type="button" id="faupload-card_up_image" class="btn btn-danger faupload" data-input-id="c-card_up_image" data-mimetype="image/gif,image/jpeg,image/png,image/jpg,image/bmp" data-multiple="false" data-preview-id="p-card_up_image"><i class="fa fa-upload"></i> {:__('Upload')}</button></span>-->
<!--                    <span><button type="button" id="fachoose-card_up_image" class="btn btn-primary fachoose" data-input-id="c-card_up_image" data-mimetype="image/*" data-multiple="false"><i class="fa fa-list"></i> {:__('Choose')}</button></span>-->
<!--                </div>-->
<!--                <span class="msg-box n-right" for="c-card_up_image"></span>-->
<!--            </div>-->
<!--            <ul class="row list-inline faupload-preview" id="p-card_up_image"></ul>-->
<!--        </div>-->
<!--    </div>-->
<!--    <div class="form-group">-->
<!--        <label class="control-label col-xs-12 col-sm-2">{:__('Card_down_image')}:</label>-->
<!--        <div class="col-xs-12 col-sm-8">-->
<!--            <div class="input-group">-->
<!--                <input id="c-card_down_image" data-rule="required" class="form-control" size="50" name="row[card_down_image]" type="text" value="{$row.card_down_image|htmlentities}">-->
<!--                <div class="input-group-addon no-border no-padding">-->
<!--                    <span><button type="button" id="faupload-card_down_image" class="btn btn-danger faupload" data-input-id="c-card_down_image" data-mimetype="image/gif,image/jpeg,image/png,image/jpg,image/bmp" data-multiple="false" data-preview-id="p-card_down_image"><i class="fa fa-upload"></i> {:__('Upload')}</button></span>-->
<!--                    <span><button type="button" id="fachoose-card_down_image" class="btn btn-primary fachoose" data-input-id="c-card_down_image" data-mimetype="image/*" data-multiple="false"><i class="fa fa-list"></i> {:__('Choose')}</button></span>-->
<!--                </div>-->
<!--                <span class="msg-box n-right" for="c-card_down_image"></span>-->
<!--            </div>-->
<!--            <ul class="row list-inline faupload-preview" id="p-card_down_image"></ul>-->
<!--        </div>-->
<!--    </div>-->
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Percentage')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-percentage" data-rule="required" class="form-control" step="0.01" name="row[percentage]" type="number" value="{$row.percentage|htmlentities}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Status')}:</label>
        <div class="col-xs-12 col-sm-8">

            <div class="radio">
            {foreach name="statusList" item="vo"}
            <label for="row[status]-{$key}"><input id="row[status]-{$key}" name="row[status]" type="radio" value="{$key}" {in name="key" value="$row.status"}checked{/in} /> {$vo}</label>
            {/foreach}
            </div>

        </div>
    </div>
<!--    <div class="form-group">-->
<!--        <label class="control-label col-xs-12 col-sm-2">{:__('Likes')}:</label>-->
<!--        <div class="col-xs-12 col-sm-8">-->
<!--            <input id="c-likes" data-rule="required" class="form-control" name="row[likes]" type="number" value="{$row.likes|htmlentities}">-->
<!--        </div>-->
<!--    </div>-->
    {/if}
    {if session('admin.id')>2}
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('是否参与新人奖励活动')}:</label>
        <div class="col-xs-12 col-sm-8">

            <div class="radio">
                {foreach name="isJoinList" item="vo"}
                <label for="row[is_join]-{$key}"><input id="row[is_join]-{$key}" name="row[is_join]" {if $row['is_join']>0}disabled{/if} type="radio" value="{$key}" {in name="key" value="$row.is_join"}checked{/in} /> {$vo}</label>
                {/foreach}
            </div>

        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('是否参与优惠券活动')}:</label>
        <div class="col-xs-12 col-sm-8">

            <div class="radio">
                {foreach name="isActivityList" item="vo"}
                <label for="row[is_activity]-{$key}"><input id="row[is_activity]-{$key}" name="row[is_activity]" {if $row['is_activity']>0}disabled{/if} type="radio" value="{$key}" {in name="key" value="$row.is_activity"}checked{/in} /> {$vo}</label>
                {/foreach}
            </div>

        </div>
    </div>
    {/if}
    <div class="form-group layer-footer">
        <label class="control-label col-xs-12 col-sm-2"></label>
        <div class="col-xs-12 col-sm-8">
            <button type="submit" class="btn btn-success btn-embossed disabled">{:__('OK')}</button>
            <button type="reset" class="btn btn-default btn-embossed">{:__('Reset')}</button>
        </div>
    </div>
</form>
